﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TicketCalculator.aspx.cs"
    Inherits="iBet.Pages.TicketCalculator" MaintainScrollPositionOnPostback="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />

    <script src="../js/Main.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="wrapper" class="wrapper">
        <div class="header">
            <img src="../images/header.png"></img>
            <br />
            <br />
        </div>
        <div id="content">
            <asp:UpdatePanel ID="upnlCombination" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:ListView ID="lvItems" runat="server" OnItemDataBound="lvItems_ItemDataBound"
                        OnItemDeleting="lvItems_ItemDeleting" OnDataBound="lvItems_DataBound">
                        <ItemTemplate>
                            <div class="combination">
                                <div class="combinationTitle">
                                    <h2>
                                        <asp:Literal ID="lblSystem" runat="server" Text='<%# Eval("SystemName") %>' />
                                    </h2>
                                    <asp:TextBox ID="txtSystemTypeMin" runat="server" Text='<%# Eval("Min") %>' />
                                    <span>
                                        <asp:Label ID="lblSeparator" runat="server" Text="/" />
                                    </span>
                                    <asp:TextBox ID="txtSystemTypeMax" runat="server" Text='<%# Eval("Max") %>' AutoPostBack="true"
                                        OnTextChanged="txtSystemType_TextChanged" AutoCompleteType="None" />
                                    <asp:LinkButton ID="btnDeleteItem" runat="server" CommandName="Delete" Text="x" />
                                    <div class="clr">
                                    </div>
                                </div>
                                <asp:ListView ID="lvOdds" runat="server" OnItemDataBound="lvOddsItemDataBound">
                                    <ItemTemplate>
                                        <div class="combinationEntry">
                                            <span>
                                                <asp:Label ID="lblMatch" runat="server" Text='<%# Eval("MatchName") %>' /></span>
                                            <asp:CheckBox ID="chkIsHit" runat="server" Checked='<%# Eval("IsHit") %>' />
                                            <asp:TextBox ID="txtOdd" runat="server" Text='<%# Eval("Odd") %>' TabIndex="1" />                                            
                                            <div class="clr">
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                    <LayoutTemplate>
                                        <div id="itemPlaceholder" runat="server">
                                        </div>
                                    </LayoutTemplate>
                                </asp:ListView>
                            </div>
                        </ItemTemplate>
                        <LayoutTemplate>
                            <div id="itemPlaceholder" runat="server">
                            </div>
                        </LayoutTemplate>
                    </asp:ListView>
                    <asp:LinkButton ID="btnCalculate" runat="server" Text="Calculate" CssClass="functionCalculate"
                        OnClick="btnCalculate_Click" TabIndex="2" />
                    <asp:LinkButton ID="btnAddItem" runat="server" Text="Add" CssClass="functionButtons"
                        OnClick="btnAddItem_Click" />
                    <asp:LinkButton ID="btnNewTicket" runat="server" Text="New Ticket" CssClass="functionButtons"
                        OnClick="btnNewTicket_Click" />
                    <div class="clr">
                    </div>
                    <div class="functions">
                        <div class="borderLine">
                        </div>
                        <div class="combinationEntry">
                            <span>
                                <asp:Label ID="lblBet" runat="server" Text="Bet" />
                            </span>
                            <asp:TextBox ID="txtBetValue" runat="server" Text="<%$ Resources:ResourceStore, InitialBet %>" />
                            <div class="clr">
                            </div>
                        </div>
                        <div class="combinationEntry">
                            <span>
                                <asp:Label ID="lblProfit" runat="server" Text="Profit" />
                            </span>
                            <asp:TextBox ID="txtProfitValue" runat="server" Text="0" ReadOnly="true" />
                            <div class="clr">
                            </div>
                        </div>
                        <div class="borderLine">
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div class="footer">
            <a href="#" class="functionButtons">about</a> <a href="#" class="functionButtons">contact</a>
            <a href="#" class="functionButtons">upatstvo</a>
        </div>
    </div>
    </form>
</body>
</html>
